<template>
    <div id="demoDiv" ref="mychart"></div>
</template>

<script>
import * as echarts from 'echarts';
export default {
    mounted() {
        let mychart = echarts.init(this.$refs.mychart);
        mychart.setOption({
            title: {
                text: 'helloWord',
            },
            xAxis: {
                data: ['EZ', 'VN', 'NOC', 'MF'],
            },
            yAxis: {},
            series: {
                name: 'lol英雄大全',
                type: 'bar',
                data: [100, 500, 2000, 300],
            },
        });
    },
};
</script>

<style>
#demoDiv {
    width: 500px;
    height: 500px;
    border: 1px solid red;
}
</style>